package com.seckill.system.api.domain;

import com.seckill.common.core.annotation.Excel;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * sku表,该表表示具体的商品实体,如黑色的 64g的iphone 8
 * </p>
 *
 * @author gao
 * @since 2021-06-18
 */
public class TbSku implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * sku id
     */
    private Long id;

    /**
     * spu id
     */
    private Long spuId;

    /**
     * 商品标题
     */
    private String title;

    /**
     * 商品的图片，多个图片以‘,’分割
     */
    private String images;

    /**
     * 销售价格，单位为分
     */
    private Long price;

    /**
     * 特有规格属性在spu属性模板中的对应下标组合
     */
    private String indexes;

    /**
     * sku的特有规格参数键值对，json格式，反序列化时请使用linkedHashMap，保证有序
     */
    private String ownSpec;

    /**
     * 是否有效，0无效，1有效
     */
    private Boolean enable;

    /**
     * 添加时间
     */
    private LocalDateTime createTime;

    /**
     * 最后修改时间
     */
    private LocalDateTime lastUpdateTime;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public Long getSpuId() {
        return spuId;
    }

    public String getTitle() {
        return title;
    }

    public String getImages() {
        return images;
    }

    public Long getPrice() {
        return price;
    }

    public String getIndexes() {
        return indexes;
    }

    public String getOwnSpec() {
        return ownSpec;
    }

    public Boolean getEnable() {
        return enable;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public LocalDateTime getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public void setIndexes(String indexes) {
        this.indexes = indexes;
    }

    public void setOwnSpec(String ownSpec) {
        this.ownSpec = ownSpec;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public void setLastUpdateTime(LocalDateTime lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    @Override
    public String toString() {
        return "TbSku{" +
                "id=" + id +
                ", spuId=" + spuId +
                ", title='" + title + '\'' +
                ", images='" + images + '\'' +
                ", price=" + price +
                ", indexes='" + indexes + '\'' +
                ", ownSpec='" + ownSpec + '\'' +
                ", enable=" + enable +
                ", createTime=" + createTime +
                ", lastUpdateTime=" + lastUpdateTime +
                '}';
    }
}
